/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entidades;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author dvasquez
 */
@Entity
@Table(name = "informeReferenciaDCD")
@NamedQueries({@NamedQuery(name = "InformeReferenciaDCD.findAll", query = "SELECT i FROM InformeReferenciaDCD i"), @NamedQuery(name = "InformeReferenciaDCD.findByNroInformeRef", query = "SELECT i FROM InformeReferenciaDCD i WHERE i.informeReferenciaDCDPK.nroInformeRef = :nroInformeRef"), @NamedQuery(name = "InformeReferenciaDCD.findById", query = "SELECT i FROM InformeReferenciaDCD i WHERE i.informeReferenciaDCDPK.id = :id"), @NamedQuery(name = "InformeReferenciaDCD.findByPcientoPMoPS", query = "SELECT i FROM InformeReferenciaDCD i WHERE i.pcientoPMoPS = :pcientoPMoPS"), @NamedQuery(name = "InformeReferenciaDCD.findByPcientoDensidadRelativa", query = "SELECT i FROM InformeReferenciaDCD i WHERE i.pcientoDensidadRelativa = :pcientoDensidadRelativa"), @NamedQuery(name = "InformeReferenciaDCD.findByNroSueloInf", query = "SELECT i FROM InformeReferenciaDCD i WHERE i.nroSueloInf = :nroSueloInf"), @NamedQuery(name = "InformeReferenciaDCD.findByDRReferencia", query = "SELECT i FROM InformeReferenciaDCD i WHERE i.dRReferencia = :dRReferencia"), @NamedQuery(name = "InformeReferenciaDCD.findByProctorReferencia", query = "SELECT i FROM InformeReferenciaDCD i WHERE i.proctorReferencia = :proctorReferencia")})
public class InformeReferenciaDCD implements Serializable {
    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected InformeReferenciaDCDPK informeReferenciaDCDPK;
    @Column(name = "pcientoPMoPS")
    private Integer pcientoPMoPS;
    @Column(name = "pcientoDensidadRelativa")
    private Integer pcientoDensidadRelativa;
    @Column(name = "nroSueloInf")
    private Integer nroSueloInf;
    @Column(name = "DRReferencia")
    private BigDecimal dRReferencia;
    @Column(name = "proctorReferencia")
    private BigDecimal proctorReferencia;

    public InformeReferenciaDCD() {
    }

    public InformeReferenciaDCD(InformeReferenciaDCDPK informeReferenciaDCDPK) {
        this.informeReferenciaDCDPK = informeReferenciaDCDPK;
    }

    public InformeReferenciaDCD(int nroInformeRef, int id) {
        this.informeReferenciaDCDPK = new InformeReferenciaDCDPK(nroInformeRef, id);
    }

    public InformeReferenciaDCDPK getInformeReferenciaDCDPK() {
        return informeReferenciaDCDPK;
    }

    public void setInformeReferenciaDCDPK(InformeReferenciaDCDPK informeReferenciaDCDPK) {
        this.informeReferenciaDCDPK = informeReferenciaDCDPK;
    }

    public Integer getPcientoPMoPS() {
        return pcientoPMoPS;
    }

    public void setPcientoPMoPS(Integer pcientoPMoPS) {
        this.pcientoPMoPS = pcientoPMoPS;
    }

    public Integer getPcientoDensidadRelativa() {
        return pcientoDensidadRelativa;
    }

    public void setPcientoDensidadRelativa(Integer pcientoDensidadRelativa) {
        this.pcientoDensidadRelativa = pcientoDensidadRelativa;
    }

    public Integer getNroSueloInf() {
        return nroSueloInf;
    }

    public void setNroSueloInf(Integer nroSueloInf) {
        this.nroSueloInf = nroSueloInf;
    }

    public BigDecimal getDRReferencia() {
        return dRReferencia;
    }

    public void setDRReferencia(BigDecimal dRReferencia){
        this.dRReferencia = dRReferencia;
    }

    public BigDecimal getProctorReferencia() {
        return proctorReferencia;
    }

    public void setProctorReferencia(BigDecimal proctorReferencia) {
        this.proctorReferencia = proctorReferencia;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (informeReferenciaDCDPK != null ? informeReferenciaDCDPK.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof InformeReferenciaDCD)) {
            return false;
        }
        InformeReferenciaDCD other = (InformeReferenciaDCD) object;
        if ((this.informeReferenciaDCDPK == null && other.informeReferenciaDCDPK != null) || (this.informeReferenciaDCDPK != null && !this.informeReferenciaDCDPK.equals(other.informeReferenciaDCDPK))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entidades.InformeReferenciaDCD[informeReferenciaDCDPK=" + informeReferenciaDCDPK + "]";
    }

}
